<!DOCTYPE html>
<title>Tests setting the poster attribute after a video is playing and then calling load.</title>
<script>
if (window.testRunner)
  testRunner.waitUntilDone();

function startTest() {
  var video = document.querySelector('video');
  video.addEventListener("playing", function () {
    video.poster = "content/abe.png";
    video.removeAttribute("src");
    video.load();
    if (window.testRunner)
      setTimeout(function() { testRunner.notifyDone(); }, 1000);
  });

  video.src = "resources/test-positive-start-time.webm"
  video.play();
}

window.addEventListener('load', startTest, false);
</script>
<video></video>
